<template>
  <div>
    <div style="width:800px;">
      <el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign" style="width: 330px;margin-top:-80px;margin-left: 30px">
        <p style="margin-left:10px">注册</p>
        <el-input v-model="register.nickName" placeholder="昵称"></el-input>
        <el-input v-model="register.username" placeholder="用户名"></el-input>
        <el-input v-model="register.password" placeholder="密码" type="password"></el-input>
        <el-input v-model="register.repeatPassword" placeholder="确认密码" type="password"></el-input>
        <el-input v-model="register.email" placeholder="邮箱"></el-input>
        <el-form-item label="性别">
          <el-radio-group v-model="register.sex">
            <el-radio label="男">男</el-radio>
            <el-radio label="女">女</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-input v-model="register.age" placeholder="年龄"></el-input>
        <el-form-item label="简介">
          <el-input type="textarea" v-model="register.introduction"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">立即注册</el-button>
          <el-button>取消</el-button>
        </el-form-item>
<!--        <el-button type="primary" style="width: 330px;float:left;margin-top:-70px" @click="loginButton">提交</el-button>-->
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  name: "register",
  data(){
    return{
      register:{
        nickName: '',
        username: '',
        password: '',
        repeatPassword: '',
        email: '',
        sex: '',
        age: '',
        introduction: ''
      },
    }
  },
  methods:{
    onSubmit() {
      this.$axios.post("/api/register/goRegisterJ",this.register).then(resp=>{
        console.log(resp)
      })
    }
  },
  created() {
  }
}
</script>

<style scoped>

</style>